﻿@using ZBJF.Warranty.Common.Enums
@using ZBJF.Warranty.Model
@using ZBJF.Warranty.WebProvider
@model ZBJF.Warranty.Model.SellerEmployee
<div class="page-header">
    <h4>
        销售商员工管理
        <small>
            <i class="icon-double-angle-right"></i>
            <span id="ShowText">销售商员工编辑</span>
        </small>
    </h4>
</div>
@using (Html.BeginForm("UpdateSellerEmployeeForm", "SellerEmployee", FormMethod.Post, new { id = "mvcForm", name = "mvcForm", @class = "form-horizontal", enctype = "multipart/form-data" }))
{
    @Html.HiddenFor(m => m.ID)
    @Html.Hidden("SellerId", Request["sellerId"])
    <div class="control-group">
        <label class="control-label">销售商员工账号:</label>
        <div class="controls">
            @Html.TextBoxFor(m => m.UserAccount, new { @class = "col-sm-8", maxlength = 15, validate = "{required:true,account:true,messages:{required:'请输入销售商员工账号'}}" })
        </div>
    </div> 
    <div class="control-group">
        <label class="control-label">销售商员工名称:</label>
        <div class="controls">
            @Html.TextBoxFor(m => m.UserName, new { @class = "col-sm-8", maxlength = 15, validate = "{required:true,messages:{required:'请输入销售商员工名称'}}" })
        </div>
    </div>
    <div class="control-group">
        <label class="control-label">员工联系电话:</label>
        <div class="controls">
            @Html.TextBoxFor(m => m.UserPhone, new { @class = "col-sm-8", validate = "{required:true,isTelphone:true,messages:{required:'请输入联系电话'}}" })
        </div>
    </div>
    <div class="control-group">
        <label class="control-label">员工邮箱:</label>
        <div class="controls">
            @Html.TextBoxFor(m => m.Email, new { @class = "col-sm-8", maxlength = 20, validate = "{required:true,email:true,messages:{required:'请输入员工邮箱'}}" })
        </div>
    </div>
    <div class="control-group">
        <label class="control-label">员工身份证:</label>
        <div class="controls">
            @Html.TextBoxFor(m => m.CertificateNO, new {@class = "col-sm-8", maxlength = 19, validate = "{required:true,isIdCardNo:true,messages:{required:'请输入员工身份证'}}"})
        </div>
    </div>
    if (Convert.ToInt32(Request["id"]) <=0)
    {
        <div class="control-group" id="div_add_admin_password">
            <label class="control-label">密码:</label>
            <div class="controls">
                @Html.PasswordFor(m => m.Password, new {@class = "col-sm-8", validate = "{required:true,messages:{required:'请输入密码'}}"})
                @Html.ValidationMessageFor(m => m.Password)
            </div>
        </div>
    }
    <div class="control-group">
        <label class="control-label">是否启用:</label>
        <div class="controls">
            <label>
                <input name="IsAvailable" type="radio" class="ace" value="true" checked="checked" />
                <span class="lbl">启用</span>
            </label>
            <label>
                <input name="IsAvailable" type="radio" class="ace" value="false" />
                <span class="lbl">不启用</span>
            </label>
        </div>
    </div>
    <div class="control-group">
        <div class="align-center">
            <button class="btn btn-primary Edit-R" type="submit">
                <i class="icon-ok bigger-110"></i>
                保存
            </button>
            <button class="btn" type="reset" data-dismiss="modal" onclick="parent.layer.closeAll()">
                <i class="icon-undo bigger-110"></i>
                取消
            </button>
        </div>
    </div>
}